package common

import (
	"time"

	"github.com/allegro/bigcache/v3"
	"github.com/prometheus/client_golang/prometheus"
)

var (
	CloudMetricCache, _  = bigcache.NewBigCache(bigcache.DefaultConfig(10 * time.Minute))
	CloudReousceCache, _ = bigcache.NewBigCache(bigcache.DefaultConfig(10 * time.Minute))
)

type CloudReousce struct {
	ID     string      `json:"id"`
	Name   string      `json:"name"`
	FdType string      `json:"type"`
	Tags   interface{} `json:"labels"`
}

type CloudMetric struct {
	Name        string
	LabelsIndex []string
	Desc        *prometheus.Desc
	Metric      CloudMetricValue
}

type CloudMetricValue struct {
	Labels map[string]string
	Ts     int64
	Value  float64
}
